import java.io.IOException;

import org.csource.fastdfs.ClientGlobal;
import org.csource.fastdfs.StorageClient;
import org.csource.fastdfs.StorageServer;
import org.csource.fastdfs.TrackerClient;
import org.csource.fastdfs.TrackerServer;
import org.junit.Test;

public class FastDFS11111 {
	
	@Test
	public void test01() throws Exception{
		//配置文件
		ClientGlobal.init("E:/workspace_taotao/taotao-manager-web/src/main/resources/properties/client.conf");	
		//获取tracker客户端
		TrackerClient trackerClient = new TrackerClient();
		//获得连接
		TrackerServer trackerServer = trackerClient.getConnection();
		//获得storageServer 引用
		StorageServer storageServer = null;
		//获得storageClient对象
		StorageClient storageClient = new StorageClient(trackerServer, storageServer);
		//上传图片
		String[] strings = storageClient.upload_file("F:/1.jpg", "jpg", null);
		//返回数组
		for (String string : strings) {
			System.out.println(string);
		}

		
		
	}
}
